package com.zzj.controller;

import com.zzj.base.Result;
import com.zzj.entity.Supplier;
import com.zzj.service.ISupplierService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 供应商 前端控制器
 * </p>
 *
 * @author zzj
 * @since 2022-12-08
 */
@RestController
@RequestMapping("supplier")
public class SupplierController {


    @Resource
    private ISupplierService supplierService;


    @PostMapping("/list")
    public Result list(){
        List<Supplier> list = supplierService.list();
        return Result.success(list);
    }

}
